<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVDriverBankTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('v_driver_bank', function (Blueprint $table) {
            $table->increments('id');
            $table->uuid('driver_uuid')->comment('货主唯一标识');
            $table->string('driver_name',10)->default('')->comment('开户人姓名');
            $table->string('driver_phone',15)->default('')->comment('银行预留手机号');
            $table->string('bank_card_no',50)->default('')->comment('银行卡号');
            $table->string('bank_branch',100)->default('')->comment('开户行');
            $table->string('bank_pictures',1000)->default('')->comment('银行卡图片地址，以英文逗号分隔');
            $table->timestamps();
            $table->index('driver_uuid', 'idx_driver_uuid');
            $table->index('bank_card_no', 'idx_bank_card_no');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('v_driver_bank');
    }
}
